#!/usr/bin/env python
# -*- coding:utf-8 -*-

"""
1. python 中类的基本属性
"""


class Student(object):

    def __init__(self, name, gender, scord):
        self.__name = name
        self.__gender = gender
        self.scord = scord

    def get_gender(self):
        # 获取学生性别
        return self.__gender

    def set_gender(self, gender):
        # 修改学生性别
        self.__gender = gender


if __name__ == "__main__":
    stu = Student('Zmj', 'M')
    if stu.get_gender() != 'M':
        print(u"1测试失败!")
    else:
        stu.set_gender('F')
        print(stu.get_gender())
        if stu.get_gender() != 'F':
            print(u"2测试失败！")
        else:
            print(u"3测试成功!")
